define(['jquery','lib/knockout','model/viewModel/appViewModel','model/services/ajaxService','shell/app'],function($,ko,appViewModel,ajaxService,app){

    var productDetailsController = function(){

        var onGetProductDetailsSuccess = function(data){
                appViewModel.productDetails(data.Products);
            },

            onGetProductDetailsError = function(error){
                alert('error');
            },
            init = function(){
                ajaxService.get('GetProducts',onGetProductDetailsSuccess,onGetProductDetailsError);

                $('body').on('click','#btnDisplayEmployees',function(){
                    app.loadAndNavigate('employees/employee','employee');

                   console.log(appViewModel.email())//email
                });
                window.location.hash = '#products';
            }();

        return {

        }

    }();


    return productDetailsController;



});